package uk.ac.ebi.bioinvindex.model.impl.term;

import javax.persistence.*;
import java.util.Collection;

/**
 * User: Nataliya Sklyar (nsklyar@ebi.ac.uk)
 * Date: Jan 4, 2008
 */
@Entity
@Table(name = "annotation_type")

public class AnnotationType extends FreeTextTermImpl{

	protected AnnotationType() {
	}

	public AnnotationType(String acc, String value) {
		super(acc, value);
	}

	public AnnotationType(String value) {
		super(value);
	}

	@OneToMany(
			targetEntity = uk.ac.ebi.bioinvindex.model.impl.term.OntologyTermImpl.class
	)
	@JoinTable(
			name = "AnnotationType2OntologyEntry",
			joinColumns = {@JoinColumn(name = "AT_ID")},
			inverseJoinColumns = @JoinColumn(name = "OE_ID")
	)
	public Collection<OntologyTermImpl> getOntologyTerms() {
		return super.getOntologyTerms();
	}
}
